﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DXApplicationTangche.UC.货号管理.service;

namespace DXApplicationTangche.UC.货号管理
{
    public partial class Form款式工艺导入预览 : DevExpress.XtraEditors.XtraForm
    {
        private List<CraftDesignStyleRelationDTO> craftDesignStyleRelationDTOs = new List<CraftDesignStyleRelationDTO>();
        public Form款式工艺导入预览(List<CraftDesignStyleRelationDTO> craftDesignStyleRelationDTOs)
        {
            InitializeComponent();
            this.craftDesignStyleRelationDTOs = craftDesignStyleRelationDTOs;
            this.gridControl款式下工艺一览.DataSource = this.craftDesignStyleRelationDTOs;
        }

        private void simpleButton确认导入_Click(object sender, EventArgs e)
        {
            try
            {
                款式迭代Service.saveCraftFacadeStyleDesignDB(craftDesignStyleRelationDTOs);
                MessageBox.Show("操作成功");
                this.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
    }
}